import java.util.Random;

/**
 * @author zhu
 * @date 2024-03-22
 */
public class Fruit {
    private String[] fruitArray = {"苹果", "西瓜", "哈密瓜", "雪梨", "榴莲", "车厘子", "山竹"};
    private int index;

    public Fruit() {
        this.index = new Random().nextInt(this.fruitArray.length);
    }

    @Override
    public String toString() {
        return this.fruitArray[this.index];
    }

    public static void main(String[] args) {
        Fruit fruit = new Fruit();

        System.out.println(fruit);
    }
}
